package cn.com.zpark.servlet_response;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @PackageName: cn.com.zpark.servlet_response
 * @ClassName: ResponseDemo02
 * @Description:
 * @author: RZS
 * @date: 2021/11/14  16:53
 */
@WebServlet("/rd2.jsp")
public class ResponseDemo02 extends HttpServlet {
    @Override
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        // 发送表示错误信息的状态码。
        response.sendError(10086, "服务器不小心走丢了");
    }
}
